3.35 \(\int \frac{(a+b \log (c x^n))^2 \log (d (\frac{1}{d}+f x^2))}{x^3} \, dx\)

Optimal. Leaf size=257 \[ \frac{1}{2} b d f n \text{PolyLog}\left (2,-\frac{1}{d f x^2}\right ) \left (a+b \log \left (c x^n\right )\right )+\frac{1}{4} b^2 d f n^2 \text{PolyLog}\left (2,-\frac{1}{d f x^2}\right )+\frac{1}{4} b^2 d f n^2 \text{PolyLog}\left (3,-\frac{1}{d f x^2}\right )-\frac{1}{2} b d f n \log \left (\frac{1}{d f x^2}+1\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{b n \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac{1}{2} d f \log \left (\frac{1}{d f x^2}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac{\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac{1}{4} b^2 d f n^2 \log \left (d f x^2+1\right )-\frac{b^2 n^2 \log \left (d f x^2+1\right )}{4 x^2}+\frac{1}{2} b^2 d f n^2 \log (x) \]

[Out]

(b^2*d*f*n^2*Log[x])/2 - (b*d*f*n*Log[1 + 1/(d*f*x^2)]*(a + b*Log[c*x^n]))/2 - (d*f*Log[1 + 1/(d*f*x^2)]*(a +
b*Log[c*x^n])^2)/2 - (b^2*d*f*n^2*Log[1 + d*f*x^2])/4 - (b^2*n^2*Log[1 + d*f*x^2])/(4*x^2) - (b*n*(a + b*Log[c
*x^n])*Log[1 + d*f*x^2])/(2*x^2) - ((a + b*Log[c*x^n])^2*Log[1 + d*f*x^2])/(2*x^2) + (b^2*d*f*n^2*PolyLog[2, -
(1/(d*f*x^2))])/4 + (b*d*f*n*(a + b*Log[c*x^n])*PolyLog[2, -(1/(d*f*x^2))])/2 + (b^2*d*f*n^2*PolyLog[3, -(1/(d
*f*x^2))])/4

________________________________________________________________________________________

Rubi [A]  time = 0.338479, antiderivative size = 257, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 11, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.393, Rules used = {2305, 2304, 2378, 266, 36, 29, 31, 2345, 2391, 2374, 6589} \[ \frac{1}{2} b d f n \text{PolyLog}\left (2,-\frac{1}{d f x^2}\right ) \left (a+b \log \left (c x^n\right )\right )+\frac{1}{4} b^2 d f n^2 \text{PolyLog}\left (2,-\frac{1}{d f x^2}\right )+\frac{1}{4} b^2 d f n^2 \text{PolyLog}\left (3,-\frac{1}{d f x^2}\right )-\frac{1}{2} b d f n \log \left (\frac{1}{d f x^2}+1\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{b n \log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac{1}{2} d f \log \left (\frac{1}{d f x^2}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac{\log \left (d f x^2+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac{1}{4} b^2 d f n^2 \log \left (d f x^2+1\right )-\frac{b^2 n^2 \log \left (d f x^2+1\right )}{4 x^2}+\frac{1}{2} b^2 d f n^2 \log (x) \]

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])^2*Log[d*(d^(-1) + f*x^2)])/x^3,x]

[Out]

(b^2*d*f*n^2*Log[x])/2 - (b*d*f*n*Log[1 + 1/(d*f*x^2)]*(a + b*Log[c*x^n]))/2 - (d*f*Log[1 + 1/(d*f*x^2)]*(a +
b*Log[c*x^n])^2)/2 - (b^2*d*f*n^2*Log[1 + d*f*x^2])/4 - (b^2*n^2*Log[1 + d*f*x^2])/(4*x^2) - (b*n*(a + b*Log[c
*x^n])*Log[1 + d*f*x^2])/(2*x^2) - ((a + b*Log[c*x^n])^2*Log[1 + d*f*x^2])/(2*x^2) + (b^2*d*f*n^2*PolyLog[2, -
(1/(d*f*x^2))])/4 + (b*d*f*n*(a + b*Log[c*x^n])*PolyLog[2, -(1/(d*f*x^2))])/2 + (b^2*d*f*n^2*PolyLog[3, -(1/(d
*f*x^2))])/4

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2378

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((g_.)*(x_))^(q_.),
 x_Symbol] :> With[{u = IntHide[(g*x)^q*(a + b*Log[c*x^n])^p, x]}, Dist[Log[d*(e + f*x^m)^r], u, x] - Dist[f*m
*r, Int[Dist[x^(m - 1)/(e + f*x^m), u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && IGtQ[p, 0
] && RationalQ[m] && RationalQ[q]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2345

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r_.))), x_Symbol] :> -Simp[(Log[1 +
d/(e*x^r)]*(a + b*Log[c*x^n])^p)/(d*r), x] + Dist[(b*n*p)/(d*r), Int[(Log[1 + d/(e*x^r)]*(a + b*Log[c*x^n])^(p
 - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2374

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> -Sim
p[(PolyLog[2, -(d*f*x^m)]*(a + b*Log[c*x^n])^p)/m, x] + Dist[(b*n*p)/m, Int[(PolyLog[2, -(d*f*x^m)]*(a + b*Log
[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin{align*} \int \frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac{1}{d}+f x^2\right )\right )}{x^3} \, dx &=-\frac{b^2 n^2 \log \left (1+d f x^2\right )}{4 x^2}-\frac{b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{2 x^2}-(2 f) \int \left (-\frac{b^2 d n^2}{4 x \left (1+d f x^2\right )}-\frac{b d n \left (a+b \log \left (c x^n\right )\right )}{2 x \left (1+d f x^2\right )}-\frac{d \left (a+b \log \left (c x^n\right )\right )^2}{2 x \left (1+d f x^2\right )}\right ) \, dx\\ &=-\frac{b^2 n^2 \log \left (1+d f x^2\right )}{4 x^2}-\frac{b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{2 x^2}+(d f) \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x \left (1+d f x^2\right )} \, dx+(b d f n) \int \frac{a+b \log \left (c x^n\right )}{x \left (1+d f x^2\right )} \, dx+\frac{1}{2} \left (b^2 d f n^2\right ) \int \frac{1}{x \left (1+d f x^2\right )} \, dx\\ &=-\frac{1}{2} b d f n \log \left (1+\frac{1}{d f x^2}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{2} d f \log \left (1+\frac{1}{d f x^2}\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac{b^2 n^2 \log \left (1+d f x^2\right )}{4 x^2}-\frac{b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{2 x^2}+(b d f n) \int \frac{\log \left (1+\frac{1}{d f x^2}\right ) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx+\frac{1}{4} \left (b^2 d f n^2\right ) \operatorname{Subst}\left (\int \frac{1}{x (1+d f x)} \, dx,x,x^2\right )+\frac{1}{2} \left (b^2 d f n^2\right ) \int \frac{\log \left (1+\frac{1}{d f x^2}\right )}{x} \, dx\\ &=-\frac{1}{2} b d f n \log \left (1+\frac{1}{d f x^2}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{2} d f \log \left (1+\frac{1}{d f x^2}\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac{b^2 n^2 \log \left (1+d f x^2\right )}{4 x^2}-\frac{b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{2 x^2}+\frac{1}{4} b^2 d f n^2 \text{Li}_2\left (-\frac{1}{d f x^2}\right )+\frac{1}{2} b d f n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-\frac{1}{d f x^2}\right )+\frac{1}{4} \left (b^2 d f n^2\right ) \operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,x^2\right )-\frac{1}{2} \left (b^2 d f n^2\right ) \int \frac{\text{Li}_2\left (-\frac{1}{d f x^2}\right )}{x} \, dx-\frac{1}{4} \left (b^2 d^2 f^2 n^2\right ) \operatorname{Subst}\left (\int \frac{1}{1+d f x} \, dx,x,x^2\right )\\ &=\frac{1}{2} b^2 d f n^2 \log (x)-\frac{1}{2} b d f n \log \left (1+\frac{1}{d f x^2}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{2} d f \log \left (1+\frac{1}{d f x^2}\right ) \left (a+b \log \left (c x^n\right )\right )^2-\frac{1}{4} b^2 d f n^2 \log \left (1+d f x^2\right )-\frac{b^2 n^2 \log \left (1+d f x^2\right )}{4 x^2}-\frac{b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+d f x^2\right )}{2 x^2}-\frac{\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )}{2 x^2}+\frac{1}{4} b^2 d f n^2 \text{Li}_2\left (-\frac{1}{d f x^2}\right )+\frac{1}{2} b d f n \left (a+b \log \left (c x^n\right )\right ) \text{Li}_2\left (-\frac{1}{d f x^2}\right )+\frac{1}{4} b^2 d f n^2 \text{Li}_3\left (-\frac{1}{d f x^2}\right )\\ \end{align*}

Mathematica [C]  time = 0.342302, size = 488, normalized size = 1.9 \[ \frac{1}{4} \left (-2 b d f n \left (-\text{PolyLog}\left (2,-i \sqrt{d} \sqrt{f} x\right )-\text{PolyLog}\left (2,i \sqrt{d} \sqrt{f} x\right )+\log (x) \left (-\log \left (1-i \sqrt{d} \sqrt{f} x\right )-\log \left (1+i \sqrt{d} \sqrt{f} x\right )+\log (x)\right )\right ) \left (-2 a-2 b \log \left (c x^n\right )+2 b n \log (x)-b n\right )+\frac{2}{3} b^2 d f n^2 \left (6 \text{PolyLog}\left (3,-i \sqrt{d} \sqrt{f} x\right )+6 \text{PolyLog}\left (3,i \sqrt{d} \sqrt{f} x\right )-6 \log (x) \text{PolyLog}\left (2,-i \sqrt{d} \sqrt{f} x\right )-6 \log (x) \text{PolyLog}\left (2,i \sqrt{d} \sqrt{f} x\right )-3 \log ^2(x) \log \left (1-i \sqrt{d} \sqrt{f} x\right )-3 \log ^2(x) \log \left (1+i \sqrt{d} \sqrt{f} x\right )+2 \log ^3(x)\right )-\frac{\log \left (d f x^2+1\right ) \left (2 a^2+2 b (2 a+b n) \log \left (c x^n\right )+2 a b n+2 b^2 \log ^2\left (c x^n\right )+b^2 n^2\right )}{x^2}+2 d f \log (x) \left (2 a^2+4 a b \left (\log \left (c x^n\right )-n \log (x)\right )+2 a b n+2 b^2 \left (\log \left (c x^n\right )-n \log (x)\right )^2+2 b^2 n \left (\log \left (c x^n\right )-n \log (x)\right )+b^2 n^2\right )-d f \log \left (d f x^2+1\right ) \left (2 a^2+4 a b \left (\log \left (c x^n\right )-n \log (x)\right )+2 a b n+2 b^2 \left (\log \left (c x^n\right )-n \log (x)\right )^2+2 b^2 n \left (\log \left (c x^n\right )-n \log (x)\right )+b^2 n^2\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])^2*Log[d*(d^(-1) + f*x^2)])/x^3,x]

[Out]

(2*d*f*Log[x]*(2*a^2 + 2*a*b*n + b^2*n^2 + 4*a*b*(-(n*Log[x]) + Log[c*x^n]) + 2*b^2*n*(-(n*Log[x]) + Log[c*x^n
]) + 2*b^2*(-(n*Log[x]) + Log[c*x^n])^2) - ((2*a^2 + 2*a*b*n + b^2*n^2 + 2*b*(2*a + b*n)*Log[c*x^n] + 2*b^2*Lo
g[c*x^n]^2)*Log[1 + d*f*x^2])/x^2 - d*f*(2*a^2 + 2*a*b*n + b^2*n^2 + 4*a*b*(-(n*Log[x]) + Log[c*x^n]) + 2*b^2*
n*(-(n*Log[x]) + Log[c*x^n]) + 2*b^2*(-(n*Log[x]) + Log[c*x^n])^2)*Log[1 + d*f*x^2] - 2*b*d*f*n*(-2*a - b*n +
2*b*n*Log[x] - 2*b*Log[c*x^n])*(Log[x]*(Log[x] - Log[1 - I*Sqrt[d]*Sqrt[f]*x] - Log[1 + I*Sqrt[d]*Sqrt[f]*x])
- PolyLog[2, (-I)*Sqrt[d]*Sqrt[f]*x] - PolyLog[2, I*Sqrt[d]*Sqrt[f]*x]) + (2*b^2*d*f*n^2*(2*Log[x]^3 - 3*Log[x
]^2*Log[1 - I*Sqrt[d]*Sqrt[f]*x] - 3*Log[x]^2*Log[1 + I*Sqrt[d]*Sqrt[f]*x] - 6*Log[x]*PolyLog[2, (-I)*Sqrt[d]*
Sqrt[f]*x] - 6*Log[x]*PolyLog[2, I*Sqrt[d]*Sqrt[f]*x] + 6*PolyLog[3, (-I)*Sqrt[d]*Sqrt[f]*x] + 6*PolyLog[3, I*
Sqrt[d]*Sqrt[f]*x]))/3)/4

________________________________________________________________________________________

Maple [F]  time = 0.131, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) ^{2}\ln \left ( d \left ({d}^{-1}+f{x}^{2} \right ) \right ) }{{x}^{3}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2*ln(d*(1/d+f*x^2))/x^3,x)

[Out]

int((a+b*ln(c*x^n))^2*ln(d*(1/d+f*x^2))/x^3,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -\frac{{\left (2 \, b^{2} \log \left (x^{n}\right )^{2} +{\left (n^{2} + 2 \, n \log \left (c\right ) + 2 \, \log \left (c\right )^{2}\right )} b^{2} + 2 \, a b{\left (n + 2 \, \log \left (c\right )\right )} + 2 \, a^{2} + 2 \,{\left (b^{2}{\left (n + 2 \, \log \left (c\right )\right )} + 2 \, a b\right )} \log \left (x^{n}\right )\right )} \log \left (d f x^{2} + 1\right )}{4 \, x^{2}} + \int \frac{2 \, b^{2} d f \log \left (x^{n}\right )^{2} + 2 \, a^{2} d f + 2 \,{\left (d f n + 2 \, d f \log \left (c\right )\right )} a b +{\left (d f n^{2} + 2 \, d f n \log \left (c\right ) + 2 \, d f \log \left (c\right )^{2}\right )} b^{2} + 2 \,{\left (2 \, a b d f +{\left (d f n + 2 \, d f \log \left (c\right )\right )} b^{2}\right )} \log \left (x^{n}\right )}{2 \,{\left (d f x^{3} + x\right )}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(d*(1/d+f*x^2))/x^3,x, algorithm="maxima")

[Out]

-1/4*(2*b^2*log(x^n)^2 + (n^2 + 2*n*log(c) + 2*log(c)^2)*b^2 + 2*a*b*(n + 2*log(c)) + 2*a^2 + 2*(b^2*(n + 2*lo
g(c)) + 2*a*b)*log(x^n))*log(d*f*x^2 + 1)/x^2 + integrate(1/2*(2*b^2*d*f*log(x^n)^2 + 2*a^2*d*f + 2*(d*f*n + 2
*d*f*log(c))*a*b + (d*f*n^2 + 2*d*f*n*log(c) + 2*d*f*log(c)^2)*b^2 + 2*(2*a*b*d*f + (d*f*n + 2*d*f*log(c))*b^2
)*log(x^n))/(d*f*x^3 + x), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b^{2} \log \left (d f x^{2} + 1\right ) \log \left (c x^{n}\right )^{2} + 2 \, a b \log \left (d f x^{2} + 1\right ) \log \left (c x^{n}\right ) + a^{2} \log \left (d f x^{2} + 1\right )}{x^{3}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(d*(1/d+f*x^2))/x^3,x, algorithm="fricas")

[Out]

integral((b^2*log(d*f*x^2 + 1)*log(c*x^n)^2 + 2*a*b*log(d*f*x^2 + 1)*log(c*x^n) + a^2*log(d*f*x^2 + 1))/x^3, x
)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2*ln(d*(1/d+f*x**2))/x**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \log \left (c x^{n}\right ) + a\right )}^{2} \log \left ({\left (f x^{2} + \frac{1}{d}\right )} d\right )}{x^{3}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(d*(1/d+f*x^2))/x^3,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2*log((f*x^2 + 1/d)*d)/x^3, x)